
export C_INCLUDE_PATH=$C_INCLUDE_PATH:include

mkdir -p build

# compile the bootloader
nasm -I bootloader -f bin bootloader/boot_loader.s -o build/boot_loader.bin
# compile program and link it
#nasm src/load_c_main.s -f elf64 -o build/load_c_main.o

gcc -m64 -ffreestanding -fno-pic -nostdinc -c src/main.c -o build/main.o
gcc -m64 -ffreestanding -fno-pic -nostdinc -c src/printf.c -o build/printf.o
ld -m  elf_x86_64  -o build/main.bin -T link.ld --oformat binary build/main.o build/printf.o
cat build/boot_loader.bin build/main.bin > build/os.img






